﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace footwear
{
    public partial class index : System.Web.UI.Page
    {
        public CategoryBus categoryBus = new CategoryBus();
        public ShoeInfoBus shoeInfoBus = new ShoeInfoBus();
        public List<Category> listCategoryShowIndex;
        public List<ShoeInfo> listCategory1;
        public List<ShoeInfo> listCategory2;
        public List<ShoeInfo> listCategory3;
        public List<ShoeInfo> listCategory4;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (DbConnect.Connection == null)
            {
                var dbConnect = new DbConnect();
            }
            listCategoryShowIndex = categoryBus.GetListCategoryShowIndex();
            listCategory1 = shoeInfoBus.GetListShoesShowIndexByCategory(listCategoryShowIndex[0].Type);
            listCategory2 = shoeInfoBus.GetListShoesShowIndexByCategory(listCategoryShowIndex[1].Type);
            listCategory3 = shoeInfoBus.GetListShoesShowIndexByCategory(listCategoryShowIndex[2].Type);
            listCategory4 = shoeInfoBus.GetListShoesShowIndexByCategory(listCategoryShowIndex[3].Type);
            
        }
    }
}